package com.tsd.common.vo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: ExportExcelConvertVo
 * @Description: TODO
 * @Author: Hillpool
 * @Date: 2021/1/7 11:05
 * @Version: 1.0
 */
public class ExportExcelConvertVo {

    private String name;

    private Object value;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public static List<ExportExcelConvertVo> parse(JSONArray array) {
        if (array == null) {
            return new ArrayList<>();
        }
        String json = array.toJSONString();
        return JSON.parseArray(json, ExportExcelConvertVo.class);
    }
}
